﻿
using InterFaceSimpeTest.ClassLib;
using InterFaceSimpeTest.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace InterFaceSimpeTest
{
    class Program
    {
        static void Main(string[] args)
        {
            List<IShow> list = new List<IShow>();
            list.Add(new MapService());//抽象了一次
            list.Add(new Voice());
            list.Add(new Video());
            list.Add(new ThreeD());
            foreach (IShow ishow in list)
            {
                ishow.Show();
            }
            new MapService().eat();
            Console.ReadLine();
        }
    }
    //interface IShow
    //{
    //    void Show();
    //}
    //public class Map : IShow
    //{
    //    public void Show()
    //    {
    //        Console.WriteLine("显示图片");
    //    }
    //}
    //public class Voice : IShow
    //{
    //    public void Show()
    //    {
    //        Console.WriteLine("播放声音");
    //    }
    //}
    //public class Video : IShow
    //{
    //    public void Show()
    //    {
    //        Console.WriteLine("显示视频");
    //    }
    //}
    //public class ThreeD : IShow
    //{
    //    public void Show()
    //    {
    //        Console.WriteLine("3D交互");
    //    }
    //}
}
